package com.wang.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 小目标库---张川川
 * @TableName tb_task
 */
@TableName(value ="tb_task")
@Data
public class TbTask implements Serializable {
    /**
     * 任务id
     */
    @TableId(type = IdType.AUTO)
    private Integer taskId;

    /**
     * 任务名称
     */
    private String taskName;

    /**
     * 计划周期
     */
    private Integer taskPeriod;

    /**
     * 计划简介
     */
    private String taskDesc;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 积分
     */
    private Integer taskIntegral;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 删除标识 0未删 1已删
     */
    private Byte delFlag;

    /**
     * 分页字段 pagesize  pagenum
     */
    @TableField(exist = false)
     private Integer pagesize;
    @TableField(exist = false)
     private Integer pagenum;
    /**
     * 任务类型 1学习任务 2设备任务 3食谱任务 4运动任务 5 购物任务 6评测任务
     */
    private Integer taskType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TbTask other = (TbTask) that;
        return (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
            && (this.getTaskPeriod() == null ? other.getTaskPeriod() == null : this.getTaskPeriod().equals(other.getTaskPeriod()))
            && (this.getTaskDesc() == null ? other.getTaskDesc() == null : this.getTaskDesc().equals(other.getTaskDesc()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getTaskIntegral() == null ? other.getTaskIntegral() == null : this.getTaskIntegral().equals(other.getTaskIntegral()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getTaskType() == null ? other.getTaskType() == null : this.getTaskType().equals(other.getTaskType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
        result = prime * result + ((getTaskPeriod() == null) ? 0 : getTaskPeriod().hashCode());
        result = prime * result + ((getTaskDesc() == null) ? 0 : getTaskDesc().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getTaskIntegral() == null) ? 0 : getTaskIntegral().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getTaskType() == null) ? 0 : getTaskType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", taskId=").append(taskId);
        sb.append(", taskName=").append(taskName);
        sb.append(", taskPeriod=").append(taskPeriod);
        sb.append(", taskDesc=").append(taskDesc);
        sb.append(", createTime=").append(createTime);
        sb.append(", taskIntegral=").append(taskIntegral);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", taskType=").append(taskType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}